<script type="text/javascript">
$(function () {
	if(CKEDITOR.instances['content']) 
		CKEDITOR.remove(CKEDITOR.instances['content']);
	var uploadParm = {
		height:'150px',
		filebrowserBrowseUrl:'${contextPath}browse-file.html',
		filebrowserImageBrowseUrl:'${contextPath}browse-image.html',
		filebrowserUploadUrl:'${contextPath}m/parkannouncement-upload.html?type=file',
		filebrowserImageUploadUrl:'${contextPath}m/parkannouncement-upload.html?type=image',
		language:'zh-cn',
	}
	content = CKEDITOR.replace('content', uploadParm);
	addFilesUploadEvent_Commodity();
});
</script>
<div class="widget" style="float:left; width:720px;">
	<div class="widget-header">
		<h3 class="title"><i class="fontello-icon-th-list-1"></i>添加商品编辑</h3>
	</div>
	<div class="widget-content">
		<form id="editCommodityForm">
			<table class="table boo-table table-content" style="width:100%; text-align:left;">
			<input type="hidden" name="oc" value="${(cu_organCode)!''}"/>
				<tr>
					<td>商品类型</td>
					<td>
						<div class="input-group">
							<span class="btn-group">
							<input type="hidden" name="fileCode" id="fileCode" /> 
							<input type="hidden" id="code" name="code" value="${(commodity.code)!''}"/>
							<input type="hidden" id="cc" name="cc" value="${(commodity.cc)!''}"/>
							<input type="text" id="categoryName" name="categoryName" value="${(commodity.categoryName)!''}" readonly="readonly"/>
							<button class="btn btn-primary" onclick="javascript: selectCategory();" title="选择商品类型" type="button"><i class="icon-search"></i></button>
							<button class="btn btn-danger" onclick="javascript: $('#categoryName').val(''); $('#cc').val('');" title="重置" type="button"><i class="icon-remove"></i></button>
							</span>
						</div>
					</td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">商品名称</td>
					<td><input type="text" id="name" name="name" style="width:300px;" value="${(commodity.name)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">品牌</td>
					<td><input type="text" id="brand" name="brand" style="width:300px;" value="${(commodity.brand)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">商品规格</td>
					<td><input type="text" id="norms" name="norms" style="width:300px;" value="${(commodity.norms)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">商品单价</td>
					<td><input type="text" id="price" name="price" style="width:300px;" value="${(commodity.price)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:120px;">商品详情</td>
					<td>
						<textarea id="content"  style="width:600px;">${(info.content)!''}</textarea>
					</td>
				</tr>
				<tr>
					<td class="table-left">展示图片<a id="uploadFilesBtn" href="javascript:;">[选择]</a></td>
					<td id="annexListTable">
						<#if list??>
							<#list list as ca>
								<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
									<input type="radio" name="choose"  value="${ca.code}" <#if ca.cover=="true">checked="checked"</#if> />
									<input type="hidden" name="list[${ca_index}].code" value="${ca.code}" />
									<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
									<a class="title" target="_blank" href="${contextPath}upload/commodityImg/${ca.sn}.${ca.ext}">${ca.name}</a>
								</div>
							</#list>
						</#if>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:center;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript:checkedCommodity();">
							<i class="fontello-icon-mail-4"></i>&nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" class="btn btn-info" onclick="javascript:sys_load_handle('commodity');">
							<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
						</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>


<div id="tempAnnexListDiv" style="display:none;">
	<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
		<input class="name" type="hidden" />
		<input class="size" type="hidden" />
		<input class="sn" type="hidden"  />
		<input class="ext" type="hidden"  />
		<input id="afcs" class="afcs" type="hidden" name="afcs" />
		<input type="radio" name="choose" class="font-cover"   checked="checked"/>
		<button type="button"  class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
		<a class="title" href="#"></a>
	</div>
</div>
<input type="hidden" id="commodity_an_index" value="${(list?size)!'0'}" />